import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * @author renhuan
 * @desc
 */
public class Listener implements MessageListener {

    @Override
    public void onMessage(Message arg0) {
        try {
            System.out.println("消息："+((TextMessage)arg0).getText());
        } catch (JMSException e) {
            e.printStackTrace();
        }

    }

}
